cmake_minimum_required(VERSION 3.0.0)
project(ImageProcessingLib VERSION 0.1.0)

set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)

add_compile_options(-fstack-protector)

# 修改clion 内存，添加下面的部分
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -fstack-protector")

include_directories("include")

include(CTest)
enable_testing()
add_subdirectory(tests)

find_package(OpenCV REQUIRED)
include_directories(${OpenCV_INCLUDE_DIRS})

message(STATUS "OpenCV library status:")
message(STATUS "    version: ${OpenCV_VERSION}")
message(STATUS "    libraries: ${OpenCV_LIBS}")
message(STATUS "    include path: ${OpenCV_INCLUDE_DIRS}")

set(CPACK_PROJECT_NAME ${PROJECT_NAME})
set(CPACK_PROJECT_VERSION ${PROJECT_VERSION})

add_library(ImageProcessingLib ImageProcessingLib.cpp HttpStreamReceive.cpp)

target_link_libraries(${PROJECT_NAME} ${OpenCV_LIBRARIES})
